package dyyx;

import redis.clients.jedis.Jedis;

public class IncrTest {
	
	public static void main(String[] args) throws Exception {	
		System.out.println("hello,IncrTest");
		Jedis jedis = new Jedis("127.0.0.1");
		System.out.println(jedis.info());
		
	
		String key = "incrkey";	
		int num = 10;
		for(int i=0;i<num;i++){
			jedis.incr(key);
		}
		System.out.println(jedis.get(key));
		
		num = 7;
		for(int i=0;i<num;i++){
			jedis.decr(key);
		}
		System.out.println(jedis.get(key));
		
			
		jedis.close();
		
	}	
	
}
